package com.star.boxiaotong.module;

public enum ColumnEnum {
    /**
     * 1. 查价时间   checkTime；
     * 2. 平台名称    platform
     * 3. 大区            area
     * 4. 城市             city
     * 5. 单价             unitPrice
     * 6. 到手价         arrivalPrcie
     * 7. 差价             difference
     * 8. 产品日期     createTime
     * 9. 限购件数      limit
     */
    CHECK_TIME("查询时间", "CheckTime"),
    PLATFORM("平台名称", "Platform"),
    AREA("大区","Area"),
    CITY("城市", "City"),
    UNIT_PRICE("单价", "UnitPrice"),
    ARRIVAL_PRICE("到手价", "ArrivalPrice"),
    DIFFERENCE("差价", "Difference"),
    CREATE_TIME("产品日期", "CreateTime"),
    LIMIT("限购件数", "Limit");




    private String value;

    private String column;



    public static ColumnEnum getEnumByValue(String text) {
        if (text == null) {
            return null;
        }
        ColumnEnum[] values = ColumnEnum.values();
        for (ColumnEnum columnEnum : values) {
            if (columnEnum.getValue().equals(text)) {
                return columnEnum;
            }
        }
        return null;
    }

    ColumnEnum(String value, String column) {
        this.value = value;
        this.column = column;
    }


    public String getValue() {
        return value;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
